import request from '@/utils/request'

// 查询设备采购入厂检验列表
export function listEntrance(query) {
  return request({
    url: '/PurchaseInspect/PurchaseInspect/list',
    method: 'get',
    params: query
  })
}

// 生产列表子菜单查询
export function listEntranceChild(query) {
  return request({
    url: '/PurchaseInspect/PurchaseInspect/childlist/' + query.id,
    method: 'get',
    params: query
  })
}

// 送检
export function submitEntrance(data) {
  return request({
    url: '/PurchaseInspect/PurchaseInspect/inspect',
    method: 'post',
    data
  })
}

// 入库
export function handleEntranceIn(ids) {
  return request({
    url: '/PurchaseInspect/PurchaseInspect/in/' + ids,
    method: 'post',
  })
}

// 退货
export function handleEntranceBack(ids) {
  return request({
    url: '/PurchaseInspect/PurchaseInspect/out/' + ids,
    method: 'post',
  })
}

// 下发
export function handleEntranceDown(data) {
  return request({
    // url: '/PurchaseInspect/PurchaseInspect/issue/' + ids,
    url: '/TEquipmentRequestDevice/TEquipmentRequestDevice/RequestDeviceIssue',
    method: 'post',
    data
  })
}
